﻿<Window x:Class="CodePlex.Styles.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:cc="clr-namespace:CodePlex.WPF.CustomControls;assembly=CodePlex.WPF.CustomControls"
        Title="WPF Themes and Custom Controls" Height="440" Width="750" WindowStartupLocation="CenterScreen">
    
    <Window.Resources>
        <Style TargetType="{x:Type TextBlock}">
            <Setter Property="Foreground" Value="Black" />
            <Setter Property="FontWeight" Value="Bold" />
        </Style>
    </Window.Resources>
	
    <Grid Margin="10" ShowGridLines="False">
        <Grid.RowDefinitions>
            <RowDefinition Height="20" />
            <RowDefinition Height="200" />
            <RowDefinition Height="20" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="220" />
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="Auto" />
        </Grid.ColumnDefinitions>
        <!-- Calendar -->
        <TextBlock Grid.Row="0" Grid.Column="0">Calendar:</TextBlock>
		<Calendar x:Name="clnWithStyle" Grid.Row="1" Grid.Column="0" HorizontalAlignment="Left" VerticalAlignment="Top" Style="{DynamicResource CalendarStyle}"/>
        <!-- DatePicker -->
        <TextBlock Grid.Row="0" Grid.Column="1">DatePicker:</TextBlock>
        <DatePicker x:Name="dtpWithStyle" Grid.Row="1" Grid.Column="1" Width="130" Height="23" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Top" CalendarStyle="{DynamicResource CalendarStyle}" Style="{DynamicResource DatePickerStyle}" />
        <!-- DataGrid -->
        <TextBlock Grid.Row="0" Grid.Column="2">DataGrid:</TextBlock>
        <DataGrid x:Name="dgridWithStyle" Grid.Row="1" Grid.Column="2" ItemsSource="{Binding}" Height="100" ColumnHeaderHeight="30" AutoGenerateColumns="False" CanUserAddRows="False" CanUserResizeRows="False" VerticalAlignment="Top" Style="{DynamicResource DataGridWPFStyle}">
            <DataGrid.Columns>
                <DataGridTextColumn Header="ID" Width="40" Binding="{Binding EmployeeID}" IsReadOnly="True">
                    <DataGridTextColumn.ElementStyle>
                        <Style>
                            <Setter Property="DataGridCell.HorizontalAlignment" Value="Right" />
                        </Style>
                    </DataGridTextColumn.ElementStyle>
                </DataGridTextColumn>
                <DataGridTextColumn Header="First Name" Width="100" Binding="{Binding FirstName}" />
                <DataGridTextColumn Header="Last Name" Width="100" Binding="{Binding LastName}" />
			</DataGrid.Columns>
		</DataGrid>
        <!-- BindingNavigator -->
        <TextBlock Grid.Row="2" Grid.Column="0">BindingNavigator:</TextBlock>
        <cc:BindingNavigator x:Name="bindingNavigator" Grid.Row="3" Grid.Column="0" Width="190" DisplayMode="FirstLastPreviousNext" HorizontalAlignment="Left" VerticalAlignment="Top" />
    </Grid>
</Window>
